how to find rank of given word